package adapter;

/**
 * @Author: Ma JiBin
 * @Email: 1423553596@qq.com
 * @Date: 2018/9/5 17:09
 * @Description: 适配器模式，解决现有项目中的旧接口与新需求不匹配问题
 */
public class Main {
    public static void main(String[] args){
        MediaPlayer mediaPlayer = new AudioPlayer();
        mediaPlayer.play("mp3","love.mp3");
        mediaPlayer.play("Vlc","hello.vlc");
        mediaPlayer.play("Mp4","As Long As you love me.mp4");
        mediaPlayer.play("flv","haha.flv");
    }
}
